function [beta] = opt_beta2(dn, SolarTime, latt)

[zenith, azimuth] = sun_positionST(dn, SolarTime, latt);

b = atand(cosd(zenith)/sind(azimuth));
b = 90 - real(b);

beta = b;